package com.im.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.im.domain.bean.TextMessage;
import com.im.service.TextMessageService;
import com.im.util.PageJpa;

/**
 * 
 * @author 岸芷汀翎
 *
 */
@RestController
@RequestMapping("/chatMessage")
public class ChatMessageController {
	@Autowired
	private TextMessageService service;
	/**
	 * 进行历史聊天记录的分页查询
	 * @param page
	 * @return
	 */
	@RequestMapping(value="/historyChat",method = RequestMethod.POST)
	public PageJpa<TextMessage> historyChat(@RequestBody PageJpa<TextMessage> page){
		return service.getHistoryChatMessage(page);
	}
}
